<?php
include("header.php");
include("model/DB.php");
include("model/User.php");
include("function/admin.login.php");

?>
<center>
<div id="admin_title">Admin Panle</div>
<div id="admin_body">
	<div id="topbar">
		<a href="index.php">Home</a>|
		<a href="admin.kid.php">Student Management</a>|
		<a href="admin.parent.php">Parent Management</a>|
		<a href="admin.teacher.php">Teacher Management</a>|
		<a href="admin.class.php">Class Management</a>|
		<a href="admin.grade.php">Grade Management</a>|
		<a href="admin.course.php">Course Management</a>|
		<a href="admin.news.php">News Management</a>|
		<a href="logout.php">Log Out</a>
	</div>
<br>


<div id="char_indi">

</div>
<div id="stat_chart">
	<div id="chart_title">Kindergarten Stastics</div>
	<div id="chart_body" >
		<table cellpadding="5" cellspacing="0">
			<tr>
				<td valign="bottom" >
					<div class="chart" style="background-color:#c43546;height:<?php echo User::getStat('kid')/3; ?>px">

					</div>
				</td>
				<td></td>
				<td valign="bottom" >
					<div class="chart" style="background-color:#a0a605;height:<?php echo User::getStat('user','parent')/2; ?>px">
					</div>
				</td>
				<td></td>
				<td valign="bottom" >
					<div class="chart" style="background-color:#00a8eb;height:<?php echo User::getStat('user','teacher'); ?>px">
					</div>
				</td>
				<td></td>
				<td valign="bottom" >
					<div class="chart" style="background-color:#39396b;height:<?php echo User::getStat('grade')*3; ?>px">
					</div>
				</td>
				<td></td>
				<td valign="bottom" >
					<div class="chart" style="background-color:grey;height:<?php echo User::getStat('class')*2; ?>px">
					</div>
					
				</td>
			</tr>

		</table>
	</div>
</div>
<div id="admin_content">
	<table style="" cellpadding="0" cellspacing="5" height="30px">
	<thead>
		<tr>
			<td>
				Students
			</td>
			<td></td>
			<td>
				Parents
			</td>
			<td></td>
			<td>
				Teachers
			</td>	
			<td></td>			
			<td>
				Grades
			</td>
			<td></td>
			<td>
				Classes
			</td>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>
				<?php echo User::getStat('kid'); ?>
			</td>
			<td></td>
			<td>
				<?php echo User::getStat('user','parent'); ?>
			</td>
			<td></td>			
			<td>
				<?php echo User::getStat('user','teacher'); ?>
			</td>
			<td></td>
			<td>
				<?php echo User::getStat('grade');  ?>
			</td>
			<td></td>
			<td>
				<?php echo User::getStat('class');  ?>
			</td>			
		</tr>
	</tbody>
	<tr></tr>
	</table>
</div>
</center>